package com.lechuang.goods.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lechuang.goods.entity.GoodsSku;
import com.lechuang.goods.service.GoodsSkuService;
import com.lechuang.goods.mapper.GoodsSkuMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author apple
* @description 针对表【goods_sku(商品sku)】的数据库操作Service实现
* @createDate 2024-06-22 11:12:30
*/
@Service
public class GoodsSkuServiceImpl extends ServiceImpl<GoodsSkuMapper, GoodsSku>
    implements GoodsSkuService{

    @Override
    public List<GoodsSku> getBySpuId(Long spuId) {
        return this.lambdaQuery()
                .eq(GoodsSku::getSpuId, spuId)
                .list();
    }

    @Override
    public List<GoodsSku> getBySpuIds(List<Long> spuIdList) {
        return this.lambdaQuery()
                .in(GoodsSku::getSpuId, spuIdList)
                .list();
    }
}




